package 赛码.成;

import java.util.Scanner;

public class 进制27 {
    public static void main(String[] args){
        String s[] = new String[]{"0","1","2","3","4","5","6","7","8","9","`","!","@","#","$","%","^","&","*","(",")","{","}","\\","<",">","?"};
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        if(i<27){
            System.out.println("");
            return;
        }
        StringBuffer sbf = new StringBuffer("");
            while(true){
                sbf.insert(0,s[i%27]);
                if(i%27==0&&i/27==1){
                    sbf.insert(0,1);
                    break;
                }
                if(i<27){
                    break;
                }
                i = i/27;
            }
        System.out.println(sbf);
    }
}
